package com.genghis.ptas.scorm.entity;


import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Created with IntelliJ IDEA.
 * User: tiangc
 * Date: 14-5-6
 * Time: 下午5:37
 * To change this template use File | Settings | File Templates.
 */
public class NodesInfoRomMapper implements RowMapper {
    @Override
    public Object mapRow(ResultSet resultSet, int i) throws SQLException {
        NodesInfo nodesInfo=new NodesInfo();
        nodesInfo.setId(resultSet.getInt("id"));
        nodesInfo.setNodeId(resultSet.getString("node_id"));
        nodesInfo.setNodeTitle(resultSet.getString("node_title"));
        nodesInfo.setParentId(resultSet.getString("parent_id"));
        nodesInfo.setScormId(resultSet.getInt("scorm_id"));
        nodesInfo.setNodeType(resultSet.getInt("node_type"));
        nodesInfo.setUrl(resultSet.getString("url"));

        return  nodesInfo;
    }
}
